﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace structural_Pattern
{
    class operationAdapter : IScoreOpe
    {
        private QuickSort sortObj;
        private BinarySearchClass searchObj;
        public operationAdapter()
        {
            sortObj = new QuickSort();
            searchObj = new BinarySearchClass();
        }
        public int search(int[] array, int key)
        {
            return searchObj.BinarySearch(array, key);
        }

        public int[] sort(int[] array)
        {
            return sortObj.QuickSork(array);
        }
    }
}
